package com.example.demospring;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class InfoController {

    @GetMapping("/system-info")
    public String showSystemInfo(Model model) {
        model.addAttribute("systemTime", SystemInfoUtils.getSystemTime());
        model.addAttribute("systemVersion", SystemInfoUtils.getSystemVersion());
        model.addAttribute("serverInfo", SystemInfoUtils.getServerInfo());

        return "system-info";
    }
}